package com.xzc.java8.B_Stream.a_filter;

import java.util.ArrayList;
import java.util.List;
import static java.util.stream.Collectors.*;

public class FilterTest {

    public static void main(String[] args) {
        List<Apple> list0 = new ArrayList<>();
        for (Apple a : list0) {
            if (a.getColor().equals("res")) {
                list0.add(a);
            }
        }

        List<Apple> list1 = list0.stream().filter(Apple::isRedApple).collect(toList());
    }
}
